# -*- coding: utf-8 -*-
# @Time    : 2021/3/19 22:51
# @Author  : lilu
# @Email   : 1906196327@qq.com
# @File    : 打印质数.py
# @Software: PyCharm

k = 0
for i in range(100,501):
    for j in range(2,i):
        if i % j == 0:
            break
    if j == i-1:
        print(i,end=" ")
        k += 1
    else:
        continue
print(f"\n100到500之间的质数一共有{k}个！")

